<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0" />
    <meta name="author" content="火星科技 http://mars2d.cn " />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="x5-fullscreen" content="true" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <!-- 标题及搜索关键字 -->
    <meta name="keywords" content="火星科技,cesium,3D,GIS,marsgis,二维,地图,地球,开发,框架,系统,示例,资料,模型,离线,外包,合肥,安徽,中国" />
    <meta
      name="description"
      content="火星科技 合肥火星 合肥火星科技 合肥火星科技有限公司 leaflet leaflet框架 leaflet开发 cesium cesium开发 cesium框架 二维 地图 模型  gis marsgis 地图离线 地图开发 地图框架 地图外包 框架 开发 外包  地图离线 二维地图 二维地图 全景漫游 地理信息系统 云GIS 二维GIS GIS平台 WebGIS"
    />

    <link rel="shortcut icon" type="image/x-icon" href="//mars2d.cn/favicon.ico" />
    <title>basemaps 瓦片底图 | Mars2D | 地理信息平台 | 火星科技 | 合肥火星科技有限公司</title>

    <!--第三方lib-->
    <script
      type="text/javascript"
      src="../lib/include-lib.js"
      libpath="../lib/"
      include="jquery,font-awesome,bootstrap,layer,haoutil,mars2d"
    ></script>

    <link href="css/style.css" rel="stylesheet" />
  </head>

  <body class="dark">
    <div id="mars2dContainer" class="mars2d-container"></div>

    <script type="text/javascript">
      "use script"; //开发环境建议开启严格模式

      $(document).ready(function () {
        initMap();
      });

      function initMap() {
        //在创建地图前的传参中配置basemaps参数
        var map = new mars2d.Map("mars2dContainer", {
          zoom: 13,
          center: { lng: 117.240601, lat: 31.827107 },
          control: {
            layers: { position: "topleft" },
          },
          basemaps: [
            {
              id: 10,
              name: "地图底图",
              type: "group",
            },
            {
              id: 2021,
              pid: 10,
              name: "天地图电子",
              icon: "img/basemaps/tianditumap.png",
              type: "group",
              layers: [
                {
                  name: "底图",
                  type: "tdt",
                  layer: "vec_d",
                  key: ["ad5bee3fe473a639887fa9d57a670c6e"],
                },
                {
                  name: "注记",
                  type: "tdt",
                  layer: "vec_z",
                  key: ["ad5bee3fe473a639887fa9d57a670c6e"],
                },
              ],
              show: true,
            },
            {
              pid: 10,
              name: "天地图卫星",
              icon: "img/basemaps/tiandituimage.png",
              type: "tdt",
              layer: "img",
              key: ["ad5bee3fe473a639887fa9d57a670c6e"],
            },
            {
              pid: 10,
              name: "天地图地形",
              icon: "img/basemaps/tianditudem.png",
              type: "tdt",
              layer: "ter",
              key: ["ad5bee3fe473a639887fa9d57a670c6e"],
              maxNativeZoom: 14,
              errorTileUrl: "img/tile/errortile.png",
            },
            {
              pid: 10,
              name: "OSM地图",
              type: "xyz",
              url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
              subdomains: "abc",
              icon: "img/basemaps/bingmap.png",
            },
            {
              pid: 10,
              name: "ArcGIS地图",
              type: "tile",
              url: "http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
              chinaCRS: "GCJ02",
              icon: "img/basemaps/bd-c-googlelite.png",
            },
            {
              pid: 10,
              name: "ArcGIS卫星",
              type: "arcgis",
              url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
              icon: "img/basemaps/bingimage.png",
            },
            {
              pid: 10,
              name: "高德地图",
              type: "gaode",
              layer: "vec",
              icon: "img/basemaps/bingmap.png",
            },
            {
              pid: 10,
              name: "高德卫星",
              type: "gaode",
              layer: "img",
              icon: "img/basemaps/bingimage.png",
            },
            {
              pid: 10,
              name: "谷歌地图",
              type: "google",
              layer: "vec",
              chinaCRS: "GCJ02",
              icon: "img/basemaps/googlemap.png",
            },
            {
              pid: 10,
              name: "谷歌卫星",
              type: "google",
              layer: "img",
              chinaCRS: "GCJ02",
              icon: "img/basemaps/googleimage.png",
            },
            {
              pid: 10,
              name: "灰色地图",
              type: "arcgis",
              url: "http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer",
              chinaCRS: "GCJ02",
              icon: "img/basemaps/bd-c-grayscale.png",
            },
            {
              id: 2017,
              pid: 10,
              name: "蓝色地图",
              type: "arcgis",
              url: "http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",
              chinaCRS: "GCJ02",
              icon: "img/basemaps/bd-c-midnight.png",
            },
          ],
        });

        //根据config配置的id或name属性，更新显示指定的地图底图
        // map.basemap = '离线地图'
      }
    </script>
  </body>
</html>
